<template>
  <div class="container">
    <div class="tabsNew">
      <el-tabs v-model="activeName" @tab-click="handleClick" class="weightTabs">
        <el-tab-pane
          label="科目一"
          name="jxsh"
          :lazy="true"
        >
          <subOne v-if="activeName == 'jxsh'" :groupparams='1' :courseparams='1' ></subOne>
        </el-tab-pane>
        <el-tab-pane
          label="科目四"
          name="jgsh"
          :lazy="true"
        >
          <subOne v-if="activeName == 'jgsh'" :groupparams='1' :courseparams='4'></subOne>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script type="text/javascript">
import subOne from "../subOne";
import subFour from "../subFour";

import checkPermission from "@/utils/permission"; // 权限判断函数
export default {
  data() {
    return {
      activeName: "jxsh",

    };
  },
  components: {
    subFour,
    subOne,
  },
  methods: {
    checkPermission,
    handleClick(tab, event) {
      this.activeName = tab.name;
    },
  },
 
};
</script>

<style lang="scss" scoped>
::v-deep {
  .is-active {
    font-weight: bold;
  }
  .weightTabs .el-tabs__item {
    font-size: 16px;
  }
  .el-tabs__header {
    margin: 0;
  }
}
</style>
